package com.openbravo.pos.config;

import com.openbravo.data.user.DirtyManager;
import com.openbravo.pos.forms.AppConfig;
import com.openbravo.pos.forms.AppLocal;
import com.openbravo.pos.util.ReportUtils;
import com.openbravo.pos.util.StringParser;

import java.awt.CardLayout;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;

import javax.swing.BorderFactory;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.GroupLayout.ParallelGroup;
import javax.swing.GroupLayout.SequentialGroup;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.LayoutStyle;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.LookAndFeel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
import javax.swing.text.Document;

import org.jvnet.substance.SubstanceLookAndFeel;
import org.jvnet.substance.api.SubstanceSkin;
import org.jvnet.substance.skin.SkinInfo;

public class JPanelConfigGeneral extends JPanel
  implements PanelConfig
{
  private DirtyManager dirty = new DirtyManager();
  private ParametersConfig printer1printerparams;
  private ParametersConfig printer2printerparams;
  private ParametersConfig printer3printerparams;
  private JComboBox cboPrinters;
  private JLabel jLabel1;
  private JLabel jLabel15;
  private JLabel jLabel16;
  private JLabel jLabel18;
  private JLabel jLabel19;
  private JLabel jLabel2;
  private JLabel jLabel20;
  private JLabel jLabel21;
  private JLabel jLabel22;
  private JLabel jLabel23;
  private JLabel jLabel24;
  private JLabel jLabel25;
  private JLabel jLabel26;
  private JLabel jLabel27;
  private JLabel jLabel28;
  private JLabel jLabel5;
  private JLabel jLabel6;
  private JLabel jLabel7;
  private JPanel jPanel1;
  private JPanel jPanel10;
  private JPanel jPanel11;
  private JPanel jPanel12;
  private JPanel jPanel13;
  private JPanel jPanel16;
  private JPanel jPanel17;
  private JPanel jPanel19;
  private JPanel jPanel2;
  private JPanel jPanel24;
  private JPanel jPanel3;
  private JPanel jPanel4;
  private JPanel jPanel5;
  private JPanel jPanel6;
  private JPanel jPanel7;
  private JPanel jPanel8;
  private JPanel jPanel9;
  private JComboBox jcboConnDisplay;
  private JComboBox jcboConnPrinter;
  private JComboBox jcboConnPrinter2;
  private JComboBox jcboConnPrinter3;
  private JComboBox jcboLAF;
  private JComboBox jcboMachineDisplay;
  private JComboBox jcboMachinePrinter;
  private JComboBox jcboMachinePrinter2;
  private JComboBox jcboMachinePrinter3;
  private JComboBox jcboMachineScale;
  private JComboBox jcboMachineScanner;
  private JComboBox jcboMachineScreenmode;
  private JComboBox jcboSerialDisplay;
  private JComboBox jcboSerialPrinter;
  private JComboBox jcboSerialPrinter2;
  private JComboBox jcboSerialPrinter3;
  private JComboBox jcboSerialScale;
  private JComboBox jcboSerialScanner;
  private JComboBox jcboTicketsBag;
  private JLabel jlblConnDisplay;
  private JLabel jlblConnPrinter;
  private JLabel jlblConnPrinter2;
  private JLabel jlblConnPrinter3;
  private JLabel jlblDisplayPort;
  private JLabel jlblPrinterPort;
  private JLabel jlblPrinterPort2;
  private JLabel jlblPrinterPort3;
  private JLabel jlblPrinterPort4;
  private JLabel jlblPrinterPort5;
  private JTextField jtxtMachineHostname;
  private JPanel m_jDisplayParams;
  private JPanel m_jPrinterParams1;
  private JPanel m_jPrinterParams2;
  private JPanel m_jPrinterParams3;
  private JPanel m_jScaleParams;
  private JPanel m_jScannerParams;
  private JTextField m_jtxtJPOSDrawer;
  private JTextField m_jtxtJPOSDrawer2;
  private JTextField m_jtxtJPOSDrawer3;
  private JTextField m_jtxtJPOSName;
  private JTextField m_jtxtJPOSPrinter;
  private JTextField m_jtxtJPOSPrinter2;
  private JTextField m_jtxtJPOSPrinter3;

  public JPanelConfigGeneral()
  {
    initComponents();
    String[] arrayOfString = ReportUtils.getPrintNames();
    this.jtxtMachineHostname.getDocument().addDocumentListener(this.dirty);
    this.jcboLAF.addActionListener(this.dirty);
    this.jcboMachineScreenmode.addActionListener(this.dirty);
    this.jcboTicketsBag.addActionListener(this.dirty);
    this.jcboMachineDisplay.addActionListener(this.dirty);
    this.jcboConnDisplay.addActionListener(this.dirty);
    this.jcboSerialDisplay.addActionListener(this.dirty);
    this.m_jtxtJPOSName.getDocument().addDocumentListener(this.dirty);
    this.jcboMachinePrinter.addActionListener(this.dirty);
    this.jcboConnPrinter.addActionListener(this.dirty);
    this.jcboSerialPrinter.addActionListener(this.dirty);
    this.m_jtxtJPOSPrinter.getDocument().addDocumentListener(this.dirty);
    this.m_jtxtJPOSDrawer.getDocument().addDocumentListener(this.dirty);
    this.printer1printerparams = new ParametersPrinter(arrayOfString);
    this.printer1printerparams.addDirtyManager(this.dirty);
    this.m_jPrinterParams1.add(this.printer1printerparams.getComponent(), "printer");
    this.jcboMachinePrinter2.addActionListener(this.dirty);
    this.jcboConnPrinter2.addActionListener(this.dirty);
    this.jcboSerialPrinter2.addActionListener(this.dirty);
    this.m_jtxtJPOSPrinter2.getDocument().addDocumentListener(this.dirty);
    this.m_jtxtJPOSDrawer2.getDocument().addDocumentListener(this.dirty);
    this.printer2printerparams = new ParametersPrinter(arrayOfString);
    this.printer2printerparams.addDirtyManager(this.dirty);
    this.m_jPrinterParams2.add(this.printer2printerparams.getComponent(), "printer");
    this.jcboMachinePrinter3.addActionListener(this.dirty);
    this.jcboConnPrinter3.addActionListener(this.dirty);
    this.jcboSerialPrinter3.addActionListener(this.dirty);
    this.m_jtxtJPOSPrinter3.getDocument().addDocumentListener(this.dirty);
    this.m_jtxtJPOSDrawer3.getDocument().addDocumentListener(this.dirty);
    this.printer3printerparams = new ParametersPrinter(arrayOfString);
    this.printer3printerparams.addDirtyManager(this.dirty);
    this.m_jPrinterParams3.add(this.printer3printerparams.getComponent(), "printer");
    this.jcboMachineScale.addActionListener(this.dirty);
    this.jcboSerialScale.addActionListener(this.dirty);
    this.jcboMachineScanner.addActionListener(this.dirty);
    this.jcboSerialScanner.addActionListener(this.dirty);
    this.cboPrinters.addActionListener(this.dirty);
    UIManager.LookAndFeelInfo[] arrayOfLookAndFeelInfo = UIManager.getInstalledLookAndFeels();
    for (int i = 0; i < arrayOfLookAndFeelInfo.length; i++)
      this.jcboLAF.addItem(new LAFInfo(arrayOfLookAndFeelInfo[i].getName(), arrayOfLookAndFeelInfo[i].getClassName()));
    Map localMap = SubstanceLookAndFeel.getAllSkins();
    Object localObject1 = localMap.values().iterator();
    while (((Iterator)localObject1).hasNext())
    {
      SkinInfo localSkinInfo = (SkinInfo)((Iterator)localObject1).next();
      this.jcboLAF.addItem(new LAFInfo(localSkinInfo.getDisplayName(), localSkinInfo.getClassName()));
    }
    this.jcboLAF.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramActionEvent)
      {
        JPanelConfigGeneral.this.changeLAF();
      }
    });
    this.jcboMachineScreenmode.addItem("window");
    this.jcboMachineScreenmode.addItem("fullscreen");
    this.jcboTicketsBag.addItem("simple");
    this.jcboTicketsBag.addItem("standard");
    this.jcboTicketsBag.addItem("restaurant");
    this.jcboMachinePrinter.addItem("screen");
    this.jcboMachinePrinter.addItem("printer");
    this.jcboMachinePrinter.addItem("epson");
    this.jcboMachinePrinter.addItem("tmu220");
    this.jcboMachinePrinter.addItem("star");
    this.jcboMachinePrinter.addItem("ithaca");
    this.jcboMachinePrinter.addItem("surepos");
    this.jcboMachinePrinter.addItem("plain");
    this.jcboMachinePrinter.addItem("javapos");
    this.jcboMachinePrinter.addItem("Not defined");
    this.jcboConnPrinter.addItem("serial");
    this.jcboConnPrinter.addItem("file");
    this.jcboSerialPrinter.addItem("COM1");
    this.jcboSerialPrinter.addItem("COM2");
    this.jcboSerialPrinter.addItem("COM3");
    this.jcboSerialPrinter.addItem("COM4");
    this.jcboSerialPrinter.addItem("LPT1");
    this.jcboSerialPrinter.addItem("/dev/ttyS0");
    this.jcboSerialPrinter.addItem("/dev/ttyS1");
    this.jcboSerialPrinter.addItem("/dev/ttyS2");
    this.jcboSerialPrinter.addItem("/dev/ttyS3");
    this.jcboMachinePrinter2.addItem("screen");
    this.jcboMachinePrinter2.addItem("printer");
    this.jcboMachinePrinter2.addItem("epson");
    this.jcboMachinePrinter2.addItem("tmu220");
    this.jcboMachinePrinter2.addItem("star");
    this.jcboMachinePrinter2.addItem("ithaca");
    this.jcboMachinePrinter2.addItem("surepos");
    this.jcboMachinePrinter2.addItem("plain");
    this.jcboMachinePrinter2.addItem("javapos");
    this.jcboMachinePrinter2.addItem("Not defined");
    this.jcboConnPrinter2.addItem("serial");
    this.jcboConnPrinter2.addItem("file");
    this.jcboSerialPrinter2.addItem("COM1");
    this.jcboSerialPrinter2.addItem("COM2");
    this.jcboSerialPrinter2.addItem("COM3");
    this.jcboSerialPrinter2.addItem("COM4");
    this.jcboSerialPrinter2.addItem("LPT1");
    this.jcboSerialPrinter2.addItem("/dev/ttyS0");
    this.jcboSerialPrinter2.addItem("/dev/ttyS1");
    this.jcboSerialPrinter2.addItem("/dev/ttyS2");
    this.jcboSerialPrinter2.addItem("/dev/ttyS3");
    this.jcboMachinePrinter3.addItem("screen");
    this.jcboMachinePrinter3.addItem("printer");
    this.jcboMachinePrinter3.addItem("epson");
    this.jcboMachinePrinter3.addItem("tmu220");
    this.jcboMachinePrinter3.addItem("star");
    this.jcboMachinePrinter3.addItem("ithaca");
    this.jcboMachinePrinter3.addItem("surepos");
    this.jcboMachinePrinter3.addItem("plain");
    this.jcboMachinePrinter3.addItem("javapos");
    this.jcboMachinePrinter3.addItem("Not defined");
    this.jcboConnPrinter3.addItem("serial");
    this.jcboConnPrinter3.addItem("file");
    this.jcboSerialPrinter3.addItem("COM1");
    this.jcboSerialPrinter3.addItem("COM2");
    this.jcboSerialPrinter3.addItem("COM3");
    this.jcboSerialPrinter3.addItem("COM4");
    this.jcboSerialPrinter3.addItem("LPT1");
    this.jcboSerialPrinter3.addItem("/dev/ttyS0");
    this.jcboSerialPrinter3.addItem("/dev/ttyS1");
    this.jcboSerialPrinter3.addItem("/dev/ttyS2");
    this.jcboSerialPrinter3.addItem("/dev/ttyS3");
    this.jcboMachineDisplay.addItem("screen");
    this.jcboMachineDisplay.addItem("window");
    this.jcboMachineDisplay.addItem("javapos");
    this.jcboMachineDisplay.addItem("epson");
    this.jcboMachineDisplay.addItem("ld200");
    this.jcboMachineDisplay.addItem("surepos");
    this.jcboMachineDisplay.addItem("Not defined");
    this.jcboConnDisplay.addItem("serial");
    this.jcboConnDisplay.addItem("file");
    this.jcboSerialDisplay.addItem("COM1");
    this.jcboSerialDisplay.addItem("COM2");
    this.jcboSerialDisplay.addItem("COM3");
    this.jcboSerialDisplay.addItem("COM4");
    this.jcboSerialDisplay.addItem("LPT1");
    this.jcboSerialDisplay.addItem("/dev/ttyS0");
    this.jcboSerialDisplay.addItem("/dev/ttyS1");
    this.jcboSerialDisplay.addItem("/dev/ttyS2");
    this.jcboSerialDisplay.addItem("/dev/ttyS3");
    this.jcboMachineScale.addItem("screen");
    this.jcboMachineScale.addItem("dialog1");
    this.jcboMachineScale.addItem("samsungesp");
    this.jcboMachineScale.addItem("Not defined");
    this.jcboSerialScale.addItem("COM1");
    this.jcboSerialScale.addItem("COM2");
    this.jcboSerialScale.addItem("COM3");
    this.jcboSerialScale.addItem("COM4");
    this.jcboSerialScale.addItem("/dev/ttyS0");
    this.jcboSerialScale.addItem("/dev/ttyS1");
    this.jcboSerialScale.addItem("/dev/ttyS2");
    this.jcboSerialScale.addItem("/dev/ttyS3");
    this.jcboMachineScanner.addItem("scanpal2");
    this.jcboMachineScanner.addItem("Not defined");
    this.jcboSerialScanner.addItem("COM1");
    this.jcboSerialScanner.addItem("COM2");
    this.jcboSerialScanner.addItem("COM3");
    this.jcboSerialScanner.addItem("COM4");
    this.jcboSerialScanner.addItem("/dev/ttyS0");
    this.jcboSerialScanner.addItem("/dev/ttyS1");
    this.jcboSerialScanner.addItem("/dev/ttyS2");
    this.jcboSerialScanner.addItem("/dev/ttyS3");
    this.cboPrinters.addItem("(Default)");
    this.cboPrinters.addItem("(Show dialog)");
    for (Object localObject2 : arrayOfString)
      this.cboPrinters.addItem(localObject2);
  }

  public boolean hasChanged()
  {
    return this.dirty.isDirty();
  }

  public Component getConfigComponent()
  {
    return this;
  }

  public void loadProperties(AppConfig paramAppConfig)
  {
    this.jtxtMachineHostname.setText(paramAppConfig.getProperty("machine.hostname"));
    String str = paramAppConfig.getProperty("swing.defaultlaf");
    this.jcboLAF.setSelectedItem(null);
    for (int i = 0; i < this.jcboLAF.getItemCount(); i++)
    {
      LAFInfo localObject = (LAFInfo)this.jcboLAF.getItemAt(i);
      if (!((LAFInfo)localObject).getClassName().equals(str))
        continue;
      this.jcboLAF.setSelectedIndex(i);
      break;
    }
    this.jcboMachineScreenmode.setSelectedItem(paramAppConfig.getProperty("machine.screenmode"));
    this.jcboTicketsBag.setSelectedItem(paramAppConfig.getProperty("machine.ticketsbag"));
    StringParser localStringParser = new StringParser(paramAppConfig.getProperty("machine.printer"));
    Object localObject = unifySerialInterface(localStringParser.nextToken(':'));
    if (("serial".equals(localObject)) || ("file".equals(localObject)))
    {
      this.jcboMachinePrinter.setSelectedItem("epson");
      this.jcboConnPrinter.setSelectedItem(localObject);
      this.jcboSerialPrinter.setSelectedItem(localStringParser.nextToken(','));
    }
    else if ("javapos".equals(localObject))
    {
      this.jcboMachinePrinter.setSelectedItem(localObject);
      this.m_jtxtJPOSPrinter.setText(localStringParser.nextToken(','));
      this.m_jtxtJPOSDrawer.setText(localStringParser.nextToken(','));
    }
    else if ("printer".equals(localObject))
    {
      this.jcboMachinePrinter.setSelectedItem(localObject);
      this.printer1printerparams.setParameters(localStringParser);
    }
    else
    {
      this.jcboMachinePrinter.setSelectedItem(localObject);
      this.jcboConnPrinter.setSelectedItem(unifySerialInterface(localStringParser.nextToken(',')));
      this.jcboSerialPrinter.setSelectedItem(localStringParser.nextToken(','));
    }
    localStringParser = new StringParser(paramAppConfig.getProperty("machine.printer.2"));
    localObject = unifySerialInterface(localStringParser.nextToken(':'));
    if (("serial".equals(localObject)) || ("file".equals(localObject)))
    {
      this.jcboMachinePrinter2.setSelectedItem("epson");
      this.jcboConnPrinter2.setSelectedItem(localObject);
      this.jcboSerialPrinter2.setSelectedItem(localStringParser.nextToken(','));
    }
    else if ("javapos".equals(localObject))
    {
      this.jcboMachinePrinter2.setSelectedItem(localObject);
      this.m_jtxtJPOSPrinter2.setText(localStringParser.nextToken(','));
      this.m_jtxtJPOSDrawer2.setText(localStringParser.nextToken(','));
    }
    else if ("printer".equals(localObject))
    {
      this.jcboMachinePrinter2.setSelectedItem(localObject);
      this.printer2printerparams.setParameters(localStringParser);
    }
    else
    {
      this.jcboMachinePrinter2.setSelectedItem(localObject);
      this.jcboConnPrinter2.setSelectedItem(unifySerialInterface(localStringParser.nextToken(',')));
      this.jcboSerialPrinter2.setSelectedItem(localStringParser.nextToken(','));
    }
    localStringParser = new StringParser(paramAppConfig.getProperty("machine.printer.3"));
    localObject = unifySerialInterface(localStringParser.nextToken(':'));
    if (("serial".equals(localObject)) || ("file".equals(localObject)))
    {
      this.jcboMachinePrinter3.setSelectedItem("epson");
      this.jcboConnPrinter3.setSelectedItem(localObject);
      this.jcboSerialPrinter3.setSelectedItem(localStringParser.nextToken(','));
    }
    else if ("javapos".equals(localObject))
    {
      this.jcboMachinePrinter3.setSelectedItem(localObject);
      this.m_jtxtJPOSPrinter3.setText(localStringParser.nextToken(','));
      this.m_jtxtJPOSDrawer3.setText(localStringParser.nextToken(','));
    }
    else if ("printer".equals(localObject))
    {
      this.jcboMachinePrinter3.setSelectedItem(localObject);
      this.printer3printerparams.setParameters(localStringParser);
    }
    else
    {
      this.jcboMachinePrinter3.setSelectedItem(localObject);
      this.jcboConnPrinter3.setSelectedItem(unifySerialInterface(localStringParser.nextToken(',')));
      this.jcboSerialPrinter3.setSelectedItem(localStringParser.nextToken(','));
    }
    localStringParser = new StringParser(paramAppConfig.getProperty("machine.display"));
    localObject = unifySerialInterface(localStringParser.nextToken(':'));
    if (("serial".equals(localObject)) || ("file".equals(localObject)))
    {
      this.jcboMachineDisplay.setSelectedItem("epson");
      this.jcboConnDisplay.setSelectedItem(localObject);
      this.jcboSerialDisplay.setSelectedItem(localStringParser.nextToken(','));
    }
    else if ("javapos".equals(localObject))
    {
      this.jcboMachineDisplay.setSelectedItem(localObject);
      this.m_jtxtJPOSName.setText(localStringParser.nextToken(','));
    }
    else
    {
      this.jcboMachineDisplay.setSelectedItem(localObject);
      this.jcboConnDisplay.setSelectedItem(unifySerialInterface(localStringParser.nextToken(',')));
      this.jcboSerialDisplay.setSelectedItem(localStringParser.nextToken(','));
    }
    localStringParser = new StringParser(paramAppConfig.getProperty("machine.scale"));
    localObject = localStringParser.nextToken(':');
    this.jcboMachineScale.setSelectedItem(localObject);
    if (("dialog1".equals(localObject)) || ("samsungesp".equals(localObject)))
      this.jcboSerialScale.setSelectedItem(localStringParser.nextToken(','));
    localStringParser = new StringParser(paramAppConfig.getProperty("machine.scanner"));
    localObject = localStringParser.nextToken(':');
    this.jcboMachineScanner.setSelectedItem(localObject);
    if ("scanpal2".equals(localObject))
      this.jcboSerialScanner.setSelectedItem(localStringParser.nextToken(','));
    this.cboPrinters.setSelectedItem(paramAppConfig.getProperty("machine.printername"));
    this.dirty.setDirty(false);
  }

  public void saveProperties(AppConfig paramAppConfig)
  {
    paramAppConfig.setProperty("machine.hostname", this.jtxtMachineHostname.getText());
    LAFInfo localLAFInfo = (LAFInfo)this.jcboLAF.getSelectedItem();
    paramAppConfig.setProperty("swing.defaultlaf", localLAFInfo == null ? System.getProperty("swing.defaultlaf", "javax.swing.plaf.metal.MetalLookAndFeel") : localLAFInfo.getClassName());
    paramAppConfig.setProperty("machine.screenmode", comboValue(this.jcboMachineScreenmode.getSelectedItem()));
    paramAppConfig.setProperty("machine.ticketsbag", comboValue(this.jcboTicketsBag.getSelectedItem()));
    String str1 = comboValue(this.jcboMachinePrinter.getSelectedItem());
    if (("epson".equals(str1)) || ("tmu220".equals(str1)) || ("star".equals(str1)) || ("ithaca".equals(str1)) || ("surepos".equals(str1)))
      paramAppConfig.setProperty("machine.printer", str1 + ":" + comboValue(this.jcboConnPrinter.getSelectedItem()) + "," + comboValue(this.jcboSerialPrinter.getSelectedItem()));
    else if ("javapos".equals(str1))
      paramAppConfig.setProperty("machine.printer", str1 + ":" + this.m_jtxtJPOSPrinter.getText() + "," + this.m_jtxtJPOSDrawer.getText());
    else if ("printer".equals(str1))
      paramAppConfig.setProperty("machine.printer", str1 + ":" + this.printer1printerparams.getParameters());
    else
      paramAppConfig.setProperty("machine.printer", str1);
    String str2 = comboValue(this.jcboMachinePrinter2.getSelectedItem());
    if (("epson".equals(str2)) || ("tmu220".equals(str2)) || ("star".equals(str2)) || ("ithaca".equals(str2)) || ("surepos".equals(str2)))
      paramAppConfig.setProperty("machine.printer.2", str2 + ":" + comboValue(this.jcboConnPrinter2.getSelectedItem()) + "," + comboValue(this.jcboSerialPrinter2.getSelectedItem()));
    else if ("javapos".equals(str2))
      paramAppConfig.setProperty("machine.printer.2", str2 + ":" + this.m_jtxtJPOSPrinter2.getText() + "," + this.m_jtxtJPOSDrawer2.getText());
    else if ("printer".equals(str2))
      paramAppConfig.setProperty("machine.printer.2", str2 + ":" + this.printer2printerparams.getParameters());
    else
      paramAppConfig.setProperty("machine.printer.2", str2);
    String str3 = comboValue(this.jcboMachinePrinter3.getSelectedItem());
    if (("epson".equals(str3)) || ("tmu220".equals(str3)) || ("star".equals(str3)) || ("ithaca".equals(str3)) || ("surepos".equals(str3)))
      paramAppConfig.setProperty("machine.printer.3", str3 + ":" + comboValue(this.jcboConnPrinter3.getSelectedItem()) + "," + comboValue(this.jcboSerialPrinter3.getSelectedItem()));
    else if ("javapos".equals(str3))
      paramAppConfig.setProperty("machine.printer.3", str3 + ":" + this.m_jtxtJPOSPrinter3.getText() + "," + this.m_jtxtJPOSDrawer3.getText());
    else if ("printer".equals(str3))
      paramAppConfig.setProperty("machine.printer.3", str3 + ":" + this.printer3printerparams.getParameters());
    else
      paramAppConfig.setProperty("machine.printer.3", str3);
    String str4 = comboValue(this.jcboMachineDisplay.getSelectedItem());
    if (("epson".equals(str4)) || ("ld200".equals(str4)) || ("surepos".equals(str4)))
      paramAppConfig.setProperty("machine.display", str4 + ":" + comboValue(this.jcboConnDisplay.getSelectedItem()) + "," + comboValue(this.jcboSerialDisplay.getSelectedItem()));
    else if ("javapos".equals(str4))
      paramAppConfig.setProperty("machine.display", str4 + ":" + this.m_jtxtJPOSName.getText());
    else
      paramAppConfig.setProperty("machine.display", str4);
    String str5 = comboValue(this.jcboMachineScale.getSelectedItem());
    if (("dialog1".equals(str5)) || ("samsungesp".equals(str5)))
      paramAppConfig.setProperty("machine.scale", str5 + ":" + comboValue(this.jcboSerialScale.getSelectedItem()));
    else
      paramAppConfig.setProperty("machine.scale", str5);
    String str6 = comboValue(this.jcboMachineScanner.getSelectedItem());
    if ("scanpal2".equals(str6))
      paramAppConfig.setProperty("machine.scanner", str6 + ":" + comboValue(this.jcboSerialScanner.getSelectedItem()));
    else
      paramAppConfig.setProperty("machine.scanner", str6);
    paramAppConfig.setProperty("machine.printername", comboValue(this.cboPrinters.getSelectedItem()));
    this.dirty.setDirty(false);
  }

  private String unifySerialInterface(String paramString)
  {
    return "rxtx".equals(paramString) ? "serial" : paramString;
  }

  private String comboValue(Object paramObject)
  {
    return paramObject == null ? "" : paramObject.toString();
  }

  private void changeLAF()
  {
    final LAFInfo localLAFInfo = (LAFInfo)this.jcboLAF.getSelectedItem();
    if ((localLAFInfo != null) && (!localLAFInfo.getClassName().equals(UIManager.getLookAndFeel().getClass().getName())))
      SwingUtilities.invokeLater(new Runnable()  
      {
        public void run()
        {
          try
          {
            String str =localLAFInfo.getClassName();
            		//this.val$laf.getClassName();
            Object localObject = Class.forName(str).newInstance();
            if ((localObject instanceof LookAndFeel))
              UIManager.setLookAndFeel((LookAndFeel)localObject);
            else if ((localObject instanceof SubstanceSkin))
              SubstanceLookAndFeel.setSkin((SubstanceSkin)localObject);
            SwingUtilities.updateComponentTreeUI(JPanelConfigGeneral.this.getTopLevelAncestor());
          }
          catch (Exception localException)
          {
          }
        }
      });
  }

  private void initComponents()
  {
    this.jPanel13 = new JPanel();
    this.jLabel5 = new JLabel();
    this.jtxtMachineHostname = new JTextField();
    this.jLabel2 = new JLabel();
    this.jcboLAF = new JComboBox();
    this.jLabel6 = new JLabel();
    this.jcboMachineScreenmode = new JComboBox();
    this.jLabel16 = new JLabel();
    this.jcboTicketsBag = new JComboBox();
    this.jLabel15 = new JLabel();
    this.jcboMachineDisplay = new JComboBox();
    this.m_jDisplayParams = new JPanel();
    this.jPanel2 = new JPanel();
    this.jPanel1 = new JPanel();
    this.jlblConnDisplay = new JLabel();
    this.jcboConnDisplay = new JComboBox();
    this.jlblDisplayPort = new JLabel();
    this.jcboSerialDisplay = new JComboBox();
    this.jPanel3 = new JPanel();
    this.jLabel20 = new JLabel();
    this.m_jtxtJPOSName = new JTextField();
    this.jLabel7 = new JLabel();
    this.jcboMachinePrinter = new JComboBox();
    this.m_jPrinterParams1 = new JPanel();
    this.jPanel5 = new JPanel();
    this.jPanel6 = new JPanel();
    this.jlblConnPrinter = new JLabel();
    this.jcboConnPrinter = new JComboBox();
    this.jlblPrinterPort = new JLabel();
    this.jcboSerialPrinter = new JComboBox();
    this.jPanel4 = new JPanel();
    this.jLabel21 = new JLabel();
    this.m_jtxtJPOSPrinter = new JTextField();
    this.m_jtxtJPOSDrawer = new JTextField();
    this.jLabel24 = new JLabel();
    this.jLabel18 = new JLabel();
    this.jcboMachinePrinter2 = new JComboBox();
    this.jLabel19 = new JLabel();
    this.m_jPrinterParams2 = new JPanel();
    this.jPanel7 = new JPanel();
    this.jPanel8 = new JPanel();
    this.jlblConnPrinter2 = new JLabel();
    this.jcboConnPrinter2 = new JComboBox();
    this.jlblPrinterPort2 = new JLabel();
    this.jcboSerialPrinter2 = new JComboBox();
    this.jPanel11 = new JPanel();
    this.m_jtxtJPOSPrinter2 = new JTextField();
    this.m_jtxtJPOSDrawer2 = new JTextField();
    this.jLabel27 = new JLabel();
    this.jLabel22 = new JLabel();
    this.jcboMachinePrinter3 = new JComboBox();
    this.jLabel25 = new JLabel();
    this.jcboMachineScale = new JComboBox();
    this.jLabel26 = new JLabel();
    this.jcboMachineScanner = new JComboBox();
    this.jLabel1 = new JLabel();
    this.cboPrinters = new JComboBox();
    this.m_jPrinterParams3 = new JPanel();
    this.jPanel9 = new JPanel();
    this.jPanel10 = new JPanel();
    this.jlblConnPrinter3 = new JLabel();
    this.jcboConnPrinter3 = new JComboBox();
    this.jlblPrinterPort3 = new JLabel();
    this.jcboSerialPrinter3 = new JComboBox();
    this.jPanel12 = new JPanel();
    this.m_jtxtJPOSPrinter3 = new JTextField();
    this.m_jtxtJPOSDrawer3 = new JTextField();
    this.jLabel28 = new JLabel();
    this.jLabel23 = new JLabel();
    this.m_jScaleParams = new JPanel();
    this.jPanel16 = new JPanel();
    this.jPanel17 = new JPanel();
    this.jlblPrinterPort4 = new JLabel();
    this.jcboSerialScale = new JComboBox();
    this.m_jScannerParams = new JPanel();
    this.jPanel24 = new JPanel();
    this.jPanel19 = new JPanel();
    this.jlblPrinterPort5 = new JLabel();
    this.jcboSerialScanner = new JComboBox();
    this.jPanel13.setBorder(BorderFactory.createTitledBorder(AppLocal.getIntString("Label.CashMachine")));
    this.jLabel5.setText(AppLocal.getIntString("Label.MachineName"));
    this.jLabel2.setText(AppLocal.getIntString("label.looknfeel"));
    this.jLabel6.setText(AppLocal.getIntString("Label.MachineScreen"));
    this.jLabel16.setText(AppLocal.getIntString("Label.Ticketsbag"));
    this.jLabel15.setText(AppLocal.getIntString("Label.MachineDisplay"));
    this.jcboMachineDisplay.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramActionEvent)
      {
        JPanelConfigGeneral.this.jcboMachineDisplayActionPerformed(paramActionEvent);
      }
    });
    this.m_jDisplayParams.setLayout(new CardLayout());
    this.m_jDisplayParams.add(this.jPanel2, "empty");
    this.jlblConnDisplay.setText(AppLocal.getIntString("label.machinedisplayconn"));
    this.jlblDisplayPort.setText(AppLocal.getIntString("label.machinedisplayport"));
    this.jcboSerialDisplay.setEditable(true);
    GroupLayout localGroupLayout1 = new GroupLayout(this.jPanel1);
    this.jPanel1.setLayout(localGroupLayout1);
    localGroupLayout1.setHorizontalGroup(localGroupLayout1.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout1.createSequentialGroup().addContainerGap().addComponent(this.jlblConnDisplay, -2, 100, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboConnDisplay, -2, 90, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jlblDisplayPort, -2, 100, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboSerialDisplay, -2, 90, -2).addContainerGap(56, 32767)));
    localGroupLayout1.setVerticalGroup(localGroupLayout1.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout1.createSequentialGroup().addGroup(localGroupLayout1.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jcboConnDisplay, -2, -1, -2).addComponent(this.jlblDisplayPort).addComponent(this.jcboSerialDisplay, -2, -1, -2).addComponent(this.jlblConnDisplay)).addGap(59, 59, 59)));
    this.m_jDisplayParams.add(this.jPanel1, "comm");
    this.jLabel20.setText(AppLocal.getIntString("Label.Name"));
    GroupLayout localGroupLayout2 = new GroupLayout(this.jPanel3);
    this.jPanel3.setLayout(localGroupLayout2);
    localGroupLayout2.setHorizontalGroup(localGroupLayout2.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout2.createSequentialGroup().addContainerGap().addComponent(this.jLabel20, -2, 100, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.m_jtxtJPOSName, -2, 90, -2).addContainerGap(270, 32767)));
    localGroupLayout2.setVerticalGroup(localGroupLayout2.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout2.createSequentialGroup().addGroup(localGroupLayout2.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.m_jtxtJPOSName, -2, -1, -2).addComponent(this.jLabel20)).addGap(184, 184, 184)));
    this.m_jDisplayParams.add(this.jPanel3, "javapos");
    this.jLabel7.setText(AppLocal.getIntString("Label.MachinePrinter"));
    this.jcboMachinePrinter.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramActionEvent)
      {
        JPanelConfigGeneral.this.jcboMachinePrinterActionPerformed(paramActionEvent);
      }
    });
    this.m_jPrinterParams1.setLayout(new CardLayout());
    this.m_jPrinterParams1.add(this.jPanel5, "empty");
    this.jlblConnPrinter.setText(AppLocal.getIntString("label.machinedisplayconn"));
    this.jlblPrinterPort.setText(AppLocal.getIntString("label.machineprinterport"));
    this.jcboSerialPrinter.setEditable(true);
    GroupLayout localGroupLayout3 = new GroupLayout(this.jPanel6);
    this.jPanel6.setLayout(localGroupLayout3);
    localGroupLayout3.setHorizontalGroup(localGroupLayout3.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout3.createSequentialGroup().addContainerGap().addComponent(this.jlblConnPrinter, -2, 100, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboConnPrinter, -2, 90, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jlblPrinterPort, -2, 100, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboSerialPrinter, -2, 90, -2).addContainerGap(56, 32767)));
    localGroupLayout3.setVerticalGroup(localGroupLayout3.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout3.createSequentialGroup().addGroup(localGroupLayout3.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jcboConnPrinter, -2, -1, -2).addComponent(this.jlblPrinterPort).addComponent(this.jcboSerialPrinter, -2, -1, -2).addComponent(this.jlblConnPrinter)).addGap(195, 195, 195)));
    this.m_jPrinterParams1.add(this.jPanel6, "comm");
    this.jLabel21.setText(AppLocal.getIntString("label.javapos.drawer"));
    this.jLabel24.setText(AppLocal.getIntString("label.javapos.printer"));
    GroupLayout localGroupLayout4 = new GroupLayout(this.jPanel4);
    this.jPanel4.setLayout(localGroupLayout4);
    localGroupLayout4.setHorizontalGroup(localGroupLayout4.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout4.createSequentialGroup().addContainerGap().addComponent(this.jLabel24, -2, 100, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.m_jtxtJPOSPrinter, -2, 90, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jLabel21, -2, 100, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.m_jtxtJPOSDrawer, -2, 90, -2).addContainerGap(56, 32767)));
    localGroupLayout4.setVerticalGroup(localGroupLayout4.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout4.createSequentialGroup().addGroup(localGroupLayout4.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.m_jtxtJPOSPrinter, -2, -1, -2).addComponent(this.jLabel21).addComponent(this.m_jtxtJPOSDrawer, -2, -1, -2).addComponent(this.jLabel24)).addGap(184, 184, 184)));
    this.m_jPrinterParams1.add(this.jPanel4, "javapos");
    this.jLabel18.setText(AppLocal.getIntString("Label.MachinePrinter2"));
    this.jcboMachinePrinter2.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramActionEvent)
      {
        JPanelConfigGeneral.this.jcboMachinePrinter2ActionPerformed(paramActionEvent);
      }
    });
    this.jLabel19.setText(AppLocal.getIntString("Label.MachinePrinter3"));
    this.m_jPrinterParams2.setLayout(new CardLayout());
    this.m_jPrinterParams2.add(this.jPanel7, "empty");
    this.jlblConnPrinter2.setText(AppLocal.getIntString("label.machinedisplayconn"));
    this.jlblPrinterPort2.setText(AppLocal.getIntString("label.machineprinterport"));
    this.jcboSerialPrinter2.setEditable(true);
    GroupLayout localGroupLayout5 = new GroupLayout(this.jPanel8);
    this.jPanel8.setLayout(localGroupLayout5);
    localGroupLayout5.setHorizontalGroup(localGroupLayout5.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout5.createSequentialGroup().addContainerGap().addComponent(this.jlblConnPrinter2, -2, 100, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboConnPrinter2, -2, 90, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jlblPrinterPort2, -2, 100, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboSerialPrinter2, -2, 90, -2).addContainerGap(56, 32767)));
    localGroupLayout5.setVerticalGroup(localGroupLayout5.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout5.createSequentialGroup().addGroup(localGroupLayout5.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jcboConnPrinter2, -2, -1, -2).addComponent(this.jlblPrinterPort2).addComponent(this.jcboSerialPrinter2, -2, -1, -2).addComponent(this.jlblConnPrinter2)).addGap(205, 205, 205)));
    this.m_jPrinterParams2.add(this.jPanel8, "comm");
    this.jLabel27.setText(AppLocal.getIntString("label.javapos.printer"));
    this.jLabel22.setText(AppLocal.getIntString("label.javapos.drawer"));
    GroupLayout localGroupLayout6 = new GroupLayout(this.jPanel11);
    this.jPanel11.setLayout(localGroupLayout6);
    localGroupLayout6.setHorizontalGroup(localGroupLayout6.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout6.createSequentialGroup().addContainerGap().addComponent(this.jLabel27, -2, 100, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.m_jtxtJPOSPrinter2, -2, 90, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jLabel22, -2, 100, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.m_jtxtJPOSDrawer2, -2, 90, -2).addContainerGap(56, 32767)));
    localGroupLayout6.setVerticalGroup(localGroupLayout6.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout6.createSequentialGroup().addGroup(localGroupLayout6.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.m_jtxtJPOSPrinter2, -2, -1, -2).addComponent(this.jLabel22).addComponent(this.m_jtxtJPOSDrawer2, -2, -1, -2).addComponent(this.jLabel27)).addGap(184, 184, 184)));
    this.m_jPrinterParams2.add(this.jPanel11, "javapos");
    this.jcboMachinePrinter3.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramActionEvent)
      {
        JPanelConfigGeneral.this.jcboMachinePrinter3ActionPerformed(paramActionEvent);
      }
    });
    this.jLabel25.setText(AppLocal.getIntString("label.scale"));
    this.jcboMachineScale.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramActionEvent)
      {
        JPanelConfigGeneral.this.jcboMachineScaleActionPerformed(paramActionEvent);
      }
    });
    this.jLabel26.setText(AppLocal.getIntString("label.scanner"));
    this.jcboMachineScanner.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramActionEvent)
      {
        JPanelConfigGeneral.this.jcboMachineScannerActionPerformed(paramActionEvent);
      }
    });
    this.jLabel1.setText(AppLocal.getIntString("label.reportsprinter"));
    this.m_jPrinterParams3.setLayout(new CardLayout());
    this.m_jPrinterParams3.add(this.jPanel9, "empty");
    this.jlblConnPrinter3.setText(AppLocal.getIntString("label.machinedisplayconn"));
    this.jlblPrinterPort3.setText(AppLocal.getIntString("label.machineprinterport"));
    this.jcboSerialPrinter3.setEditable(true);
    GroupLayout localGroupLayout7 = new GroupLayout(this.jPanel10);
    this.jPanel10.setLayout(localGroupLayout7);
    localGroupLayout7.setHorizontalGroup(localGroupLayout7.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout7.createSequentialGroup().addContainerGap().addComponent(this.jlblConnPrinter3, -2, 100, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboConnPrinter3, -2, 90, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jlblPrinterPort3, -2, 100, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboSerialPrinter3, -2, 90, -2).addContainerGap(56, 32767)));
    localGroupLayout7.setVerticalGroup(localGroupLayout7.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout7.createSequentialGroup().addGroup(localGroupLayout7.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jcboConnPrinter3, -2, -1, -2).addComponent(this.jlblPrinterPort3).addComponent(this.jcboSerialPrinter3, -2, -1, -2).addComponent(this.jlblConnPrinter3)).addGap(125, 125, 125)));
    this.m_jPrinterParams3.add(this.jPanel10, "comm");
    this.jLabel28.setText(AppLocal.getIntString("label.javapos.printer"));
    this.jLabel23.setText(AppLocal.getIntString("label.javapos.drawer"));
    GroupLayout localGroupLayout8 = new GroupLayout(this.jPanel12);
    this.jPanel12.setLayout(localGroupLayout8);
    localGroupLayout8.setHorizontalGroup(localGroupLayout8.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout8.createSequentialGroup().addContainerGap().addComponent(this.jLabel28, -2, 110, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.m_jtxtJPOSPrinter3, -2, 90, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jLabel23, -2, 110, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.m_jtxtJPOSDrawer3, -2, 90, -2).addContainerGap(36, 32767)));
    localGroupLayout8.setVerticalGroup(localGroupLayout8.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout8.createSequentialGroup().addGroup(localGroupLayout8.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.m_jtxtJPOSPrinter3, -2, -1, -2).addComponent(this.jLabel23).addComponent(this.m_jtxtJPOSDrawer3, -2, -1, -2).addComponent(this.jLabel28)).addGap(224, 224, 224)));
    this.m_jPrinterParams3.add(this.jPanel12, "javapos");
    this.m_jScaleParams.setLayout(new CardLayout());
    this.m_jScaleParams.add(this.jPanel16, "empty");
    this.jlblPrinterPort4.setText(AppLocal.getIntString("label.machineprinterport"));
    this.jcboSerialScale.setEditable(true);
    GroupLayout localGroupLayout9 = new GroupLayout(this.jPanel17);
    this.jPanel17.setLayout(localGroupLayout9);
    localGroupLayout9.setHorizontalGroup(localGroupLayout9.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout9.createSequentialGroup().addContainerGap().addComponent(this.jlblPrinterPort4, -2, 100, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboSerialScale, -2, 90, -2).addContainerGap(270, 32767)));
    localGroupLayout9.setVerticalGroup(localGroupLayout9.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout9.createSequentialGroup().addGroup(localGroupLayout9.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jcboSerialScale, -2, -1, -2).addComponent(this.jlblPrinterPort4)).addGap(135, 135, 135)));
    this.m_jScaleParams.add(this.jPanel17, "comm");
    this.m_jScannerParams.setLayout(new CardLayout());
    this.m_jScannerParams.add(this.jPanel24, "empty");
    this.jlblPrinterPort5.setText(AppLocal.getIntString("label.machineprinterport"));
    this.jcboSerialScanner.setEditable(true);
    GroupLayout localGroupLayout10 = new GroupLayout(this.jPanel19);
    this.jPanel19.setLayout(localGroupLayout10);
    localGroupLayout10.setHorizontalGroup(localGroupLayout10.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout10.createSequentialGroup().addContainerGap().addComponent(this.jlblPrinterPort5, -2, 100, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboSerialScanner, -2, 90, -2).addContainerGap(270, 32767)));
    localGroupLayout10.setVerticalGroup(localGroupLayout10.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout10.createSequentialGroup().addGroup(localGroupLayout10.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jcboSerialScanner, -2, -1, -2).addComponent(this.jlblPrinterPort5)).addGap(235, 235, 235)));
    this.m_jScannerParams.add(this.jPanel19, "comm");
    GroupLayout localGroupLayout11 = new GroupLayout(this.jPanel13);
    this.jPanel13.setLayout(localGroupLayout11);
    localGroupLayout11.setHorizontalGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout11.createSequentialGroup().addContainerGap().addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout11.createSequentialGroup().addComponent(this.jLabel15, -2, 130, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboMachineDisplay, -2, 165, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.m_jDisplayParams, -1, 484, 32767)).addGroup(localGroupLayout11.createSequentialGroup().addComponent(this.jLabel7, -2, 130, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboMachinePrinter, -2, 165, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.m_jPrinterParams1, -1, 484, 32767)).addGroup(localGroupLayout11.createSequentialGroup().addComponent(this.jLabel18, -2, 130, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboMachinePrinter2, -2, 165, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.m_jPrinterParams2, -1, 484, 32767)).addGroup(localGroupLayout11.createSequentialGroup().addComponent(this.jLabel19, -2, 130, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboMachinePrinter3, -2, 165, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.m_jPrinterParams3, -1, 484, 32767)).addGroup(localGroupLayout11.createSequentialGroup().addComponent(this.jLabel25, -2, 130, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboMachineScale, -2, 165, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.m_jScaleParams, -1, 484, 32767)).addGroup(localGroupLayout11.createSequentialGroup().addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout11.createSequentialGroup().addComponent(this.jLabel26, -2, 130, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboMachineScanner, -2, 165, -2)).addGroup(localGroupLayout11.createSequentialGroup().addComponent(this.jLabel1, -2, 130, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.cboPrinters, -2, 165, -2))).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.m_jScannerParams, -1, 484, 32767)).addGroup(localGroupLayout11.createSequentialGroup().addComponent(this.jLabel5, -2, 130, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jtxtMachineHostname, -2, 165, -2)).addGroup(localGroupLayout11.createSequentialGroup().addComponent(this.jLabel2, -2, 130, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboLAF, -2, 165, -2)).addGroup(localGroupLayout11.createSequentialGroup().addComponent(this.jLabel6, -2, 130, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboMachineScreenmode, -2, 165, -2)).addGroup(localGroupLayout11.createSequentialGroup().addComponent(this.jLabel16, -2, 130, -2).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(this.jcboTicketsBag, -2, 165, -2))).addContainerGap()));
    localGroupLayout11.setVerticalGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout11.createSequentialGroup().addContainerGap().addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jLabel5).addComponent(this.jtxtMachineHostname, -2, -1, -2)).addGap(6, 6, 6).addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jLabel2).addComponent(this.jcboLAF, -2, -1, -2)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jLabel6).addComponent(this.jcboMachineScreenmode, -2, -1, -2)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jLabel16).addComponent(this.jcboTicketsBag, -2, -1, -2)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jLabel15).addComponent(this.jcboMachineDisplay, -2, -1, -2)).addComponent(this.m_jDisplayParams, -2, 24, -2)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jLabel7).addComponent(this.jcboMachinePrinter, -2, -1, -2)).addComponent(this.m_jPrinterParams1, -2, 24, -2)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jLabel18).addComponent(this.jcboMachinePrinter2, -2, -1, -2)).addComponent(this.m_jPrinterParams2, -2, 24, -2)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jLabel19).addComponent(this.jcboMachinePrinter3, -2, -1, -2)).addComponent(this.m_jPrinterParams3, -2, 24, -2)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jLabel25).addComponent(this.jcboMachineScale, -2, -1, -2)).addComponent(this.m_jScaleParams, -2, 24, -2)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout11.createSequentialGroup().addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jLabel26).addComponent(this.jcboMachineScanner, -2, -1, -2)).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addGroup(localGroupLayout11.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(this.jLabel1).addComponent(this.cboPrinters, -2, -1, -2))).addComponent(this.m_jScannerParams, -2, 33, -2)).addContainerGap(-1, 32767)));
    GroupLayout localGroupLayout12 = new GroupLayout(this);
    setLayout(localGroupLayout12);
    localGroupLayout12.setHorizontalGroup(localGroupLayout12.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout12.createSequentialGroup().addContainerGap().addComponent(this.jPanel13, -1, -1, 32767).addContainerGap()));
    localGroupLayout12.setVerticalGroup(localGroupLayout12.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(localGroupLayout12.createSequentialGroup().addContainerGap().addComponent(this.jPanel13, -2, -1, -2).addContainerGap(17, 32767)));
  }

  private void jcboMachineScannerActionPerformed(ActionEvent paramActionEvent)
  {
    CardLayout localCardLayout = (CardLayout)(CardLayout)this.m_jScannerParams.getLayout();
    if ("scanpal2".equals(this.jcboMachineScanner.getSelectedItem()))
      localCardLayout.show(this.m_jScannerParams, "comm");
    else
      localCardLayout.show(this.m_jScannerParams, "empty");
  }

  private void jcboMachineScaleActionPerformed(ActionEvent paramActionEvent)
  {
    CardLayout localCardLayout = (CardLayout)(CardLayout)this.m_jScaleParams.getLayout();
    if (("dialog1".equals(this.jcboMachineScale.getSelectedItem())) || ("samsungesp".equals(this.jcboMachineScale.getSelectedItem())))
      localCardLayout.show(this.m_jScaleParams, "comm");
    else
      localCardLayout.show(this.m_jScaleParams, "empty");
  }

  private void jcboMachinePrinter3ActionPerformed(ActionEvent paramActionEvent)
  {
    CardLayout localCardLayout = (CardLayout)(CardLayout)this.m_jPrinterParams3.getLayout();
    if (("epson".equals(this.jcboMachinePrinter3.getSelectedItem())) || ("tmu220".equals(this.jcboMachinePrinter3.getSelectedItem())) || ("star".equals(this.jcboMachinePrinter3.getSelectedItem())) || ("ithaca".equals(this.jcboMachinePrinter3.getSelectedItem())) || ("surepos".equals(this.jcboMachinePrinter3.getSelectedItem())))
      localCardLayout.show(this.m_jPrinterParams3, "comm");
    else if ("javapos".equals(this.jcboMachinePrinter3.getSelectedItem()))
      localCardLayout.show(this.m_jPrinterParams3, "javapos");
    else if ("printer".equals(this.jcboMachinePrinter3.getSelectedItem()))
      localCardLayout.show(this.m_jPrinterParams3, "printer");
    else
      localCardLayout.show(this.m_jPrinterParams3, "empty");
  }

  private void jcboMachinePrinter2ActionPerformed(ActionEvent paramActionEvent)
  {
    CardLayout localCardLayout = (CardLayout)(CardLayout)this.m_jPrinterParams2.getLayout();
    if (("epson".equals(this.jcboMachinePrinter2.getSelectedItem())) || ("tmu220".equals(this.jcboMachinePrinter2.getSelectedItem())) || ("star".equals(this.jcboMachinePrinter2.getSelectedItem())) || ("ithaca".equals(this.jcboMachinePrinter2.getSelectedItem())) || ("surepos".equals(this.jcboMachinePrinter2.getSelectedItem())))
      localCardLayout.show(this.m_jPrinterParams2, "comm");
    else if ("javapos".equals(this.jcboMachinePrinter2.getSelectedItem()))
      localCardLayout.show(this.m_jPrinterParams2, "javapos");
    else if ("printer".equals(this.jcboMachinePrinter2.getSelectedItem()))
      localCardLayout.show(this.m_jPrinterParams2, "printer");
    else
      localCardLayout.show(this.m_jPrinterParams2, "empty");
  }

  private void jcboMachineDisplayActionPerformed(ActionEvent paramActionEvent)
  {
    CardLayout localCardLayout = (CardLayout)(CardLayout)this.m_jDisplayParams.getLayout();
    if (("epson".equals(this.jcboMachineDisplay.getSelectedItem())) || ("ld200".equals(this.jcboMachineDisplay.getSelectedItem())) || ("surepos".equals(this.jcboMachineDisplay.getSelectedItem())))
      localCardLayout.show(this.m_jDisplayParams, "comm");
    else if ("javapos".equals(this.jcboMachineDisplay.getSelectedItem()))
      localCardLayout.show(this.m_jDisplayParams, "javapos");
    else
      localCardLayout.show(this.m_jDisplayParams, "empty");
  }

  private void jcboMachinePrinterActionPerformed(ActionEvent paramActionEvent)
  {
    CardLayout localCardLayout = (CardLayout)(CardLayout)this.m_jPrinterParams1.getLayout();
    if (("epson".equals(this.jcboMachinePrinter.getSelectedItem())) || ("tmu220".equals(this.jcboMachinePrinter.getSelectedItem())) || ("star".equals(this.jcboMachinePrinter.getSelectedItem())) || ("ithaca".equals(this.jcboMachinePrinter.getSelectedItem())) || ("surepos".equals(this.jcboMachinePrinter.getSelectedItem())))
      localCardLayout.show(this.m_jPrinterParams1, "comm");
    else if ("javapos".equals(this.jcboMachinePrinter.getSelectedItem()))
      localCardLayout.show(this.m_jPrinterParams1, "javapos");
    else if ("printer".equals(this.jcboMachinePrinter.getSelectedItem()))
      localCardLayout.show(this.m_jPrinterParams1, "printer");
    else
      localCardLayout.show(this.m_jPrinterParams1, "empty");
  }

  private static class LAFInfo
  {
    private String name;
    private String classname;

    public LAFInfo(String paramString1, String paramString2)
    {
      this.name = paramString1;
      this.classname = paramString2;
    }

    public String getName()
    {
      return this.name;
    }

    public String getClassName()
    {
      return this.classname;
    }

    public String toString()
    {
      return this.name;
    }
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.config.JPanelConfigGeneral
 * JD-Core Version:    0.6.0
 */